<template>
	<view class="Recommend">
		<view class="team-top">
			<view class="img">
				<image class="headerImg" :src="userinfo.avatar | imgurl"></image>
			</view>
			<view>昵称:{{userinfo.nickname}}</view>
			<view>级别：{{userinfo.level}}</view>
		</view>
		<view class="team-list">
			<view class="title">
				<text class="icon"></text>
				<text class="tit">等级规则</text>
			</view>
			<view class="info">
				<text>等级1：动态提现每天500UFT，每月额度3000UFT.</text>
				<text>等级2：动态提现每天1000UFT，每月额度10000UFT.</text>
				<text>等级3：动态提现每天1000UFT，每月额度15000UFT.</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userinfo: []
			};
		},
		onLoad() {

			this.getData();

		},
		methods: {
			getData: function() {
				const _this = this;
				//获取用户信息
				this.$request.get("/api/user/getUserInfo", {})
					.then(res => {
						if (res.data.code == 1) {
							_this.userinfo = res.data.data.user;
						}
					})
					.catch(error => {
						console.error('error:', error);
					});
			},
		},
		filters: {
			imgurl(value) {
				value = 'http://www.huanqiuyt.com' + value
				return value
			},
			numFilter2(value) {
				// 截取当前数据到小数点后两位
				let realVal = Number(value).toFixed(1)
				// num.toFixed(2)获取的是字符串
				return Number(realVal)
			}
		}
	}
</script>

<style lang="less">
	.Recommend {
		background-color: #F1F1F1;
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;

		.team-top {
			width: 96%;
			height: 120px;
			background-color: #FFFFFF;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: space-around;
			border-top: 5px solid #F1F1F1;
			border-bottom: 10px solid #F1F1F1;
			font-size: 14px;
			color: #24435D;

			.headerImg {
				border-radius: 50%;
				overflow: hidden;
				width: 120upx;
				height: 120upx;
			}

		}

		.team-list {
			width: 96%;
			background-color: #FFFFFF;
			flex: 1;
			font-size: 12px;
			color: #24435D;

			.title {
				display: flex;
				height: 50px;
				align-items: center;

				.icon {
					width: 6px;
					height: 30px;
					background: rgba(39, 146, 229, 1);

				}

				.tit {
					font-size: 22px;
					flex: 1;
					padding-left: 16px;
				}
			}

			.info {
				display: flex;
				flex-direction: column;
				line-height: 60upx;
				padding-left: 22px;
				padding-right: 10px;

				.zt {
					line-height: 60px;

				}
			}
		}
	}
</style>
